﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DictionaryManager.aspx.cs"
    Inherits="WebPubManager_DictionaryManager" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>数据字典管理</title>
    <link href="../css/page.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript">
        function newParam() {
            var name = prompt('请输入数据字典类别名', '');
            if (name != "") {
                window.location.href = "DictionaryAdd.aspx?action=addroot&name=" + name;
            }
            return false;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div style="width: 90%; margin: 0px auto; text-align: center;">
        <div style="text-align: center; margin-top:1px;" class="tab_top">
            请输入数据字典名： &nbsp;
            <asp:TextBox ID="txtParamItem" runat="server">
            </asp:TextBox>
            &nbsp;
            <asp:Button ID="btnQuery" runat="server" CssClass="input" OnClick="btnQuery_Clicked"
                Text="查询" />
            &nbsp;
            <asp:HyperLink ID="InsertName" runat="server" NavigateUrl="DictionaryAdd.aspx?action=addroot"
                Text="新增类别" />
        </div>
        <controlDefine:CustomGridView ID="CustomGridView1" runat="server" AllowPaging="false"
            AutoGenerateColumns="false" SkinID="List" Width="100%" ShowHideColModel="None"
            DivFstClass-DivButtonClass="input" DivScdClass-DivButtonClass="input" DivTrdClass-DivButtonClass="input"
            OnOnLoadData="CustomGridView1_OnLoadData">
            <Columns>
                <asp:BoundField DataField="name" HeaderText="数据字典类名"></asp:BoundField>
                <asp:BoundField DataField="item_count" HeaderText="个数"></asp:BoundField>
                <asp:TemplateField HeaderText="字典项">
                    <ItemTemplate>
                        <asp:HyperLink ID="hlChildren" runat="server" NavigateUrl='<%#string.Format("DictionaryItemManager.aspx?name={0}", Eval("name")) %>'>编辑子项</asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="删除">
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemTemplate>
                        <asp:HyperLink ID="hlDelete" runat="server" NavigateUrl='<%# string.Format("DictionaryManager.aspx?action=delete&name={0}", Eval("name"))%>'>删除</asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <PagerSettings Visible="False" />
            <HeaderStyle CssClass="top_table" Height="30px" Width="50px" />
            <RowStyle CssClass="inputtable" />
        </controlDefine:CustomGridView>
    </div>
    </form>
</body>
</html>
